package ch13;

import java.util.Scanner;

public class SelectionSortTimer {

	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		System.out.println("Enter array size:");
		int n = in.nextInt();
		
		int[] a = ArrayUtil.randomIntArray(n, 100);
		SelectionSorter sorter = new SelectionSorter(a);
		
		StopWatch timer = new StopWatch();
		
		timer.start();
		sorter.sort();
		timer.stop();
		
		System.out.println("Elapsed time: " + timer.getElapseTime() + " milliseconds");
		
	}

}
